package com.yuanchu.store.controller;

import com.yuanchu.common.utils.PageResult;
import com.yuanchu.common.utils.R;
import com.yuanchu.store.dto.QueryRechargeParamsDto;
import com.yuanchu.store.entity.YoshopRechargeOrderEntity;
import com.yuanchu.store.service.YoshopRechargeOrderService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @version: 1.0
 * @Author: adan
 * @description:
 * @date: 2024-03-03 1:14
 */
@RestController
@RequestMapping("recharge")
public class StoreRechargeController {

    @Resource
    private YoshopRechargeOrderService responseService;

    // /store/user/recharge/order?page=1
    @ApiOperation("查询充值记录")
    @GetMapping("/order")
    public R queryRechargeOrder(QueryRechargeParamsDto param) {
        PageResult<YoshopRechargeOrderEntity> userInfoDto = responseService.queryRechargeOrder(param);
        return R.ok().putPage("data", userInfoDto);
    }
}
